using System;
using System.Collections;

using System.Xml.Serialization;

namespace Evaluant.Uss.DomainModel.ClassModel
{
	[Serializable]
	public class EnumerationCollection : CollectionBase
	{

		public int Add(Enumeration value)
		{
			return base.List.Add(value as object);
		}

		public void Remove(Enumeration value)
		{
			base.List.Remove( (object)value);
		}

		public void Insert(int index, Enumeration value)
		{
			base.List.Insert(index, (object)value);
		}

		public bool Contains(Enumeration value)
		{
			return base.List.Contains( (object)value);
		}

		public Enumeration this[int index]
		{
			get { return ( (Enumeration)base.List[index]); }
		}

		public Enumeration GetEnumByName(string type)
		{
			foreach(Enumeration en in base.List)
				if(en.Name == type)
					return en;
			return null;
		}
	}
}
